; Asks user for a disk to format. This uses the AmigaDOS
; requestchoice under 3.0 and the requestchoice program
; included with Rush under AmigaDOS 2.x.
;
; Written by Douglas Keller
;
requestchoice >env:formatdisk pubscreen {pubscreen} "Disk Format" "Select disk to Format?*n*nWARNING!*nAll data will be lost on the disk!" "df0:|pc0:|ff0:|ff1:|Cancel"
if val $formatdisk EQ 1
set disk "df0:"
endif
if val $formatdisk EQ 2
set disk "pc0:"
endif
if val $formatdisk EQ 3
set disk "ff0:"
endif
if val $formatdisk EQ 4
set disk "ff1:"
endif
if val $formatdisk EQ 0
quit
endif
if exists env:formatdisk
delete quiet "env:formatdisk"
endif
if val $formatdisk EQ 2
set diskoptions "IBM noicons"
else
set diskoptions "AmigaDOS ffs noicons"
endif
run >nil: <nil: format drive $disk name $diskoptions <z:rush/scripts/return >con:30/50/400/70/Format/screen{pubscreen}